import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.border.LineBorder;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class FrameSeccion extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JButton BTRegistrar;
	private JTextField TXTnumero;
	private JLabel jLabel1;
	
	public FrameSeccion() {
		super();
		initGUI();
	}
	
	ActionListener Registrar = new ActionListener()
	{
		public void actionPerformed(ActionEvent e)
		{
			Cerrar();
		}
    };
    private void Cerrar()
    {
    	Seccion sec = new Seccion(this.TXTnumero.getText());
		FramePrincipal Principal = new FramePrincipal(sec);
		Principal.setVisible(true);
		Principal.setLocationRelativeTo(null);
		this.dispose();
    }
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setTitle("Registrar Seccion");
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1);
				jPanel1.setBounds(41, 20, 264, 112);
				jPanel1.setLayout(null);
				jPanel1.setBorder(new LineBorder(new java.awt.Color(0,0,0), 1, false));
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
					jLabel1.setText("Ingrese el número de la Seccion");
					jLabel1.setBounds(21, 13, 254, 15);
				}
				{
					TXTnumero = new JTextField();
					jPanel1.add(TXTnumero);
					TXTnumero.setBounds(48, 42, 168, 22);
				}
				{
					BTRegistrar = new JButton();
					jPanel1.add(BTRegistrar);
					BTRegistrar.setText("Registrar");
					BTRegistrar.setBounds(75, 73, 104, 27);
					BTRegistrar.setFont(new java.awt.Font("Bitstream Charter",1,12));
					BTRegistrar.addActionListener(Registrar);
				}
			}
			pack();
			this.setSize(353, 188);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
